import request from '@/utils/http';

// 获取详情页数据
export const getDetailInfo = (id) => request({
    url: '/goods',
    method: 'GET',
    params: {
        id
    }
});

// 获取热榜数据（type=1：24小时；type=2：一周）
export const getHotGoodsInfo = ({ id, type, limit = 3 }) => request({
    url: '/goods/hot',
    params: {
        id,
        type,
        limit
    }
});